package a.f.j;

import a.c.bb;
import a.c.e;
import a.c.q;
import a.c.w;
import a.c.x;
import a.i.l;
import a.i.n;

import java.util.Comparator;

public class d
  implements s
{
  private s a = null;
  private cb b;
  private q c;
  private a.c.ab d;
  private boolean e;
  public static int f;
  
  public d(s params)
  {
    this.a = params;
    this.d = new a.c.ab();
    this.e = false;
  }
  
  public void a(cb paramcb)
  {
    boolean bool = ab.g;
    int j = ab.f;
    a.c.ab localab = null;
    Object localObject1 = null;
    a.c.ab[] arrayOfab = null;
    bb localbb = new bb();
    this.b = paramcb;
    this.c = paramcb.a();
    x localx = this.c.B();
    arrayOfab = a.a.m.d(paramcb.a());
    localab = a(this.c);
    int i = 0;
    label70:
    break label410;
    if (i < arrayOfab.length) {
      localObject1 = arrayOfab[i];
    }
    label150:
    label154:
    label350:
    while (bool)
    {
      if (j != 0) {
        break label495;
      }
      Object localObject2 = localObject1.l();
      do
      {
        if (!((a.c.m)localObject2).e()) {
          break;
        }
        if (bool) {
          break label154;
        }
        this.c.g(((a.c.m)localObject2).a());
        ((a.c.m)localObject2).f();
        if (j != 0) {
          break label150;
        }
      } while (j == 0);
      if (!bool) {
        localbb.clear();
      }
      while (bool)
      {
        localObject2 = this.c.v();
        do
        {
          if (!((w)localObject2).e()) {
            break;
          }
          e locale = ((w)localObject2).d();
          if (j != 0) {
            break label350;
          }
          if (locale.c() == 0)
          {
            localbb.add(locale);
            this.c.d(((w)localObject2).d());
          }
          ((w)localObject2).f();
        } while (j == 0);
        n.a(this, 0, "Compute Planar Subgraph for biconnected component...");
        this.a.a(this.b);
        n.a(this, 0, "Save planarization...");
        a(localx);
        n.a(this, 0, "Store hidden edges...");
        if (bool) {
          break label401;
        }
        localObject2 = this.a.b().l();
        do
        {
          if (!((a.c.m)localObject2).e()) {
            break;
          }
          this.d.add(((a.c.m)localObject2).a());
          ((a.c.m)localObject2).f();
          if (bool) {
            break label410;
          }
          if (j != 0) {
            break label403;
          }
        } while (j == 0);
      }
      localObject2 = localbb.l();
      do
      {
        if (!((w)localObject2).e()) {
          break label389;
        }
        this.c.e(((w)localObject2).d());
        ((w)localObject2).f();
        if ((!bool) && (j != 0)) {
          break;
        }
      } while (j == 0);
      if (bool) {
        break label495;
      }
      localObject2 = this.c.w();
      do
      {
        if (!((a.c.m)localObject2).e()) {
          break label473;
        }
        if (j != 0) {
          break;
        }
        if (this.b.h(((a.c.m)localObject2).a())) {
          localab.add(((a.c.m)localObject2).a());
        }
        this.c.f(((a.c.m)localObject2).a());
        ((a.c.m)localObject2).f();
      } while (j == 0);
      i++;
      if (bool) {
        break label70;
      }
      if (j == 0) {
        break;
      }
    }
    label389:
    label401:
    label403:
    label410:
    label473:
    label495:
    a.c.m localm = localab.l();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        this.c.g(localm.a());
        localm.f();
        if (bool) {
          break label564;
        }
        if (j != 0) {
          break label557;
        }
      } while (j == 0);
    } while (bool);
    localm = this.d.l();
    label557:
    label564:
    if (localm.e()) {}
    do
    {
      this.c.f(localm.a());
      localm.f();
      if ((!bool) && (j != 0)) {
        return;
      }
      if (j == 0) {
        break;
      }
      c(localx);
      this.b.f();
      this.c.a(localx);
      this.e = true;
    } while (bool);
    a();
  }
  
  public a.c.ab b()
  {
    if ((ab.g) || (this.e)) {
      return this.d;
    }
    throw new RuntimeException("Invalid Execution Order: call 'createPlanarization' first!");
  }
  
  protected void a(x paramx)
  {
    boolean bool = ab.g;
    int i = ab.f;
    w localw = this.c.v();
    label136:
    label138:
    do
    {
      do
      {
        if (!localw.e()) {
          return;
        }
        e locale = localw.d();
        a.c.ab localab = (a.c.ab)paramx.get(locale);
        if ((bool) || (localab == null))
        {
          localab = new a.c.ab();
          paramx.a(locale, localab);
        }
        a.c.m localm = locale.n();
        do
        {
          if (!localm.e()) {
            break;
          }
          localab.add(localm.a());
          localm.f();
          if (bool) {
            break label138;
          }
          if (i != 0) {
            break label136;
          }
        } while (i == 0);
      } while (bool);
      localw.f();
    } while (i == 0);
  }
  
  private void c(x paramx)
  {
    int i = ab.f;
    w localw = this.c.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      a.c.ab localab = (a.c.ab)paramx.get(locale);
      locale.b(new Comparator()
      {
        private final a.c.ab val$sortedEdges;
        
        public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
        {
          a.c.d locald1 = (a.c.d)paramAnonymousObject1;
          a.c.d locald2 = (a.c.d)paramAnonymousObject2;
          return l.a(this.val$sortedEdges.indexOf(locald1), this.val$sortedEdges.indexOf(locald2));
        }
      });
      localw.f();
    } while (i == 0);
  }
  
  private a.c.ab a(q paramq)
  {
    boolean bool = ab.g;
    int i = ab.f;
    a.c.ab localab = new a.c.ab();
    a.c.m localm = paramq.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (!bool)
      {
        if (i != 0) {
          break label75;
        }
        localab.add(locald);
        paramq.f(locald);
        localm.f();
      }
    } while (i == 0);
    label75:
    return localab;
  }
  
  public void a() {}
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.j.d

 * JD-Core Version:    0.7.0.1

 */